﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="FrmConceptoTesoreria.aspx.cs" Inherits="UI.Tesoreria.FrmConceptoTesoreria" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">

        .style4
        {
            /*background: url(Administration/Images/Grey/captionbckg.gif) repeat-x;*/
        background: #f9f9f9 url('../Imagenes/grey/captionbckg.gif') repeat-x;
            color: #333333;
            text-align: left;
            line-height: 16px;
            font-size: 11px;
            font-weight: bold;
            padding-top: 4px;
            padding-left: 4px;
            font-family: tahoma,arial,verdana,sans-serif;
            height: 23px;
        }
         .styleCOntrolIngreso
        {
            width: 60px;
            height: 26px;
        }
        .style33
        {
            width: 11px;
            height: 26px;
        }
        .style32
        {
            width: 12px;
            height: 26px;
        }
        .botoncito
        {
            height: 26px;
        }
        .style34
        {
            width: 778px;
        }
        .style10
        {
            height: 26px;
            width: 8px;
        }
                        
        .styleLabel
        {
            width: 10px;
            height: 26px;
        }
         .style22
        {
            height: 32px;
            width: 8px;
        }
        .style23
        {
            width: 60px;
            height: 32px;
        }
        .style11
        {
            height: 25px;
            width: 8px;
        }
        .style2
        {
            height: 25px;
        }
                
        .style16
        {
            height: 28px;
            width: 111px;
        }
        .style27
        {
            width: 235px;
        }
        .style13
        {
            width: 236px;
        }
        </style>

    <script type="text/javascript">

        //Función que permite solo Números
        function ValidaSoloNumeros() {
            if ((event.keyCode < 48) || (event.keyCode > 57))
                event.returnValue = false;
        }

        //Función que permite solo Texto o Letras
        function txNombres() {
            if ((event.keyCode != 32) && (event.keyCode < 65) || (event.keyCode > 90) && (event.keyCode < 97) || (event.keyCode > 122))
                event.returnValue = false;
        }

        function isNumberOrLetter() {
            if (((event.keyCode < 48) || (event.keyCode > 57)) && ((event.keyCode != 32) && (event.keyCode < 65) || (event.keyCode > 90) && (event.keyCode < 97) || (event.keyCode > 122)))
                event.returnValue = false;
        }

        function check() {
            var value = document.getElementById('<%=txtCodigo.ClientID%>').value;
            alert('Ingrese Código');
            document.getElementById('<%=txtCodigo.ClientID%>').focus();
            return true;
            //return false;
        }

        function ValidarNumFloat(e, obj) {
            tecla = (document.all) ? e.keyCode : e.which;
            if (tecla == 8) return true;

            Punto = obj.value.split('.');
            if (Punto.length >= 2) {
                patron = /[0-9]/;
            } else
                patron = /[0-9.]/;
            te = String.fromCharCode(tecla);

            return patron.test(te);
        }
   
    </script>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    
<asp:UpdatePanel ID="panelActualizar" runat="server">
    <Triggers>
        <asp:PostBackTrigger ControlID="GridConceptoTesoreria"/>
    </Triggers>
    <ContentTemplate>
    <asp:Panel ID="Panel1" runat="server">
     <table dir="ltr" frame="box">
                    <tr>
                        <td  class="style4" colspan="7">
                            FILTROS</td>
                    </tr>
                    <tr>
                        <td >
                            <asp:Label ID="Label1" runat="server" Text="Codigo"></asp:Label>
                        </td>
                        <td class="styleCOntrolIngreso">
                            <asp:TextBox ID="txtCodigoFiltro" runat="server" Height="16px" Width="89px"></asp:TextBox>
                        </td>
                        <td class="style33">
                            </td>
                        <td class="styleCOntrolIngreso">
                            <asp:Label ID="Label2" runat="server" Text="Nombre"></asp:Label>
                        </td>
                        <td class="styleCOntrolIngreso">
                            <asp:TextBox ID="txtNombreFiltro" runat="server" Height="18px" Width="234px"></asp:TextBox>
                        </td>
                        <td class="style32">
                            </td>
                        <td class="styleCOntrolIngreso">
                            <asp:Button ID="Button1" runat="server" CssClass="botoncito" Text="Buscar" 
                                onclick="Button1_Click1"/>
                        </td>
                    </tr>
          </table>

        <asp:Label ID="LabelErrorListado" runat="server" Font-Bold="True" 
            ForeColor="Red"></asp:Label>

        <br />
        <table style="width: 868px" >
            <tr>
                <td class="style34" >
                    </td>
                <td >
                    <asp:Button ID="btnNuevo" runat="server" Height="32px" 
                        Text="Nuevo" Width="88px" onclick="btnNuevo_Click1" />
                </td>
            </tr>
        </table>

        <asp:GridView ID="GridConceptoTesoreria" runat="server" 
            AutoGenerateColumns="False" Width="876px" DataKeyNames="id" 
            onrowcommand="GridConceptoTesoreria_RowCommand" 
            onload="GridConceptoTesoreria_Load" 
            onrowdatabound="GridConceptoTesoreria_RowDataBound">
            <Columns>
                <asp:BoundField DataField="id" HeaderText="ID" Visible="False" />
                <asp:BoundField DataField="Codigo" HeaderText="Codigo" />
                <asp:BoundField DataField="Nombre" HeaderText="Nombre" />
                <asp:BoundField DataField="Monto" HeaderText="Monto" />
                
                <%--<asp:BoundField DataField="Activo" HeaderText="Activo" />--%>

                <%--<asp:TemplateField HeaderText="Estado">
                    <ItemTemplate>
                          <asp:CheckBox AutoPostBack="true" ID="checkActivo" runat="server" Checked='<%#Eval("Activo")%>'
                          Width="70px"></asp:CheckBox></ItemTemplate>
                    </asp:TemplateField>
                <asp:BoundField DataField="Activo" HeaderText="Activo" Visible="false">
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>--%>
                                
                <asp:BoundField DataField="IDCreadoPor" HeaderText="Creador" />
                <asp:BoundField DataField="FechaCreacion" HeaderText="F. Creacion" />
                <asp:BoundField DataField="IDModificadoPor" HeaderText="Modifcado Por" />
                <asp:BoundField DataField="FechaModificacion" HeaderText="F.  Modificacion" />


                <asp:TemplateField>
                <ItemTemplate>
                    <asp:LinkButton ID="modificar" Runat="server" 
                    CommandName="Modificar">
                    Modificar
                    </asp:LinkButton>
                </ItemTemplate>
                </asp:TemplateField> 

                <asp:TemplateField>
                <ItemTemplate>
                    <asp:LinkButton ID="eliminar" Runat="server" 
                    OnClientClick="return confirm('¿Desea eliminar el registro?');" 
                        CommandName="Eliminar">
                    Eliminar
                    </asp:LinkButton>
                </ItemTemplate>
                </asp:TemplateField> 

            </Columns>
        </asp:GridView>
        <br />

    </asp:Panel>
    </ContentTemplate>
</asp:UpdatePanel>    
    
<asp:UpdatePanel ID="panelActualizarMantenimiento" runat="server">
   <Triggers>
        <%--<asp:PostBackTrigger ControlID="btnBuscar" />--%>   
    </Triggers>
   <ContentTemplate>
   
    <asp:Panel ID="Panel2" runat="server">
     <asp:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" 
        Width="457px">
        <asp:TabPanel runat="server" HeaderText="TabPanel1" ID="TabPanel1">            
            <HeaderTemplate>                
                Concepto de Tesorería
            </HeaderTemplate>            
            <ContentTemplate>                
                <table class="style1">                    
                    <tr>                        
                        <td class="style4" colspan="3">                            
                            DATOS GENERALES</td>                        
                    </tr>                    
                    <tr>                        
                        <td class="style10">                            
                            <asp:Label ID="Label4" runat="server" CssClass="leftColumn" Text="CODIGO"></asp:Label>                            
                        </td>                        
                        <td class="styleCOntrolIngreso">                            
                            <asp:TextBox ID="txtCodigo" runat="server" CssClass="textEntry" Height="19px"></asp:TextBox>
                        </td>
                        <td>
                           
                        </td>                        
                    </tr>                    
                    <tr>                        
                        <td class="style10">                            
                            <asp:Label ID="Label6" runat="server" Text="NOMBRE"></asp:Label>                            
                        </td>                        
                        <td class="styleCOntrolIngreso">                            
                            <asp:TextBox ID="txtNombre" runat="server" CssClass="textEntry" Height="20px" 
                                Width="360px"></asp:TextBox>
                        </td>
                        <td></td>                        
                    </tr>                    
                    <tr>                        
                        <td class="style10">                            
                            <asp:Label ID="Label7" runat="server" Text="MONTO"></asp:Label>                            
                        </td>                        
                        <td class="styleLabel">                            
                            <asp:TextBox ID="txtMonto" runat="server" Height="20px" Width="83px" onkeypress="return ValidarNumFloat(event,this);"></asp:TextBox>                                                                                                              
                        </td>
                        <td></td>                        
                    </tr>
                    <tr>                        
                        <td class="style10">                            
                            <asp:Label ID="Label3" runat="server" Text="ACTIVO"></asp:Label>                            
                        </td>                        
                        <td class="styleLabel">                            
                            <asp:CheckBox ID="chkEstado" runat="server" />                           
                        </td>
                        <td></td>                        
                    </tr>                                                               
                    <tr>                        
                        <td class="style11">                            
                            <asp:Label ID="labelID" runat="server" Visible="False"></asp:Label>                            
                        </td>                        
                        <td class="style2">                            
                        </td>
                        <td></td>                        
                    </tr>                    
                </table>                
                <br />                                                
                <asp:Label ID="LabelError" runat="server" Font-Bold="True" ForeColor="Red"></asp:Label>                               
                <br />
                <br />              
                <table class="style1" style="width: 54%">                    
                    <tr>                        
                        <td class="style27">                            
                            <asp:Button ID="btnNuevoConTes" runat="server" CssClass="botoncito" 
                                Text="Grabar" onclick="btnNuevoConTes_Click"/>                            
                        </td>                        
                        <td class="style13">                            
                            <asp:Button ID="BtnCancelarConTes" runat="server" CssClass="botoncito" 
                                 Text="Cancelar" onclick="BtnCancelarConTes_Click" />                            
                        </td>                        
                        <td class="style16">                            
                            &nbsp;</td>                        
                    </tr>                    
                </table>                
                <br />                
            </ContentTemplate>
            

        </asp:TabPanel>
    </asp:TabContainer>
    </asp:Panel>
    </ContentTemplate>
    </asp:UpdatePanel>
    
<asp:HiddenField ID="HiddenFiel1" runat="server" />
<asp:ModalPopupExtender ID="formularioNuevo" runat="server" PopupControlID="panelActualizarMantenimiento"
TargetControlID="HiddenFiel1" BackgroundCssClass="modalBackground">
</asp:ModalPopupExtender>

<asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="panelActualizar" DisplayAfter="0">
    <ProgressTemplate>
        <div style="background-color: Gray; filter:alpha(opacity=60); opacity:0.60; width: 100%; top: 0px; left: 0px; position: fixed; height: 100%;">
        </div>
          <div style="margin:auto;
              font-family:Trebuchet MS;
              filter: alpha(opacity=100);
              opacity: 1;
              font-size:small;
              vertical-align: middle;
              top: 45%;
              position: fixed;
              right: 45%;
              color: #275721;
              text-align: center;
              background-color: White;
              height: 100px; bottom: 296px;">
                <table style=" background-color: White; font-family: Sans-Serif; text-align: center; border: solid 1px #275721; color: #275721; width: inherit; height: inherit; padding: 15px;">
                <tr>
                <td style=" text-align: inherit;"><img src="../Imagenes/Gif/cargando.gif" alt="Loading"  /></td>
                <td style=" text-align: inherit;"><span style="font-family: Sans-Serif; font-size: medium; font-weight: bold; font">Cargando...</span></td>
                </tr>
                </table>
        </div>
    </ProgressTemplate>
    </asp:UpdateProgress>

<asp:UpdateProgress ID="UpdateProgress2" runat="server" AssociatedUpdatePanelID="panelActualizarMantenimiento" DisplayAfter="0">
    <ProgressTemplate>
        <div style="background-color: Gray; filter:alpha(opacity=60); opacity:0.60; width: 100%; top: 0px; left: 0px; position: fixed; height: 100%;">
        </div>
          <div style="margin:auto;
              font-family:Trebuchet MS;
              filter: alpha(opacity=100);
              opacity: 1;
              font-size:small;
              vertical-align: middle;
              top: 45%;
              position: fixed;
              right: 45%;
              color: #275721;
              text-align: center;
              background-color: White;
              height: 100px; bottom: 296px;">
                <table style=" background-color: White; font-family: Sans-Serif; text-align: center; border: solid 1px #275721; color: #275721; width: inherit; height: inherit; padding: 15px;">
                <tr>
                <td style=" text-align: inherit;"><img src="../Imagenes/Gif/cargando.gif" alt="Loading"  /></td>
                <td style=" text-align: inherit;"><span style="font-family: Sans-Serif; font-size: medium; font-weight: bold; font">Cargando...</span></td>
                </tr>
                </table>
        </div>
    </ProgressTemplate>
    </asp:UpdateProgress>        
      
<br />
<br />
</asp:Content>
